<?php use_stylesheets_for_form($form) ?>
<?php use_javascripts_for_form($form) ?>

<form action="<?php echo url_for('login/'.($form->getObject()->isNew() ? 'create' : 'update').(!$form->getObject()->isNew() ? '?idusuarios='.$form->getObject()->getIdusuarios() : '')) ?>" method="post" <?php $form->isMultipart() and print 'enctype="multipart/form-data" ' ?>>
    <?php if (!$form->getObject()->isNew()): ?>
    <input type="hidden" name="sf_method" value="put" />
    <?php endif; ?>
     <div>
        <fieldset class="formulario">
            <legend class="padraoCinza">Edição de usuários</legend>
            <div class="db">
                <?php
                    echo $form['login']->renderLabel();
                    echo $form['login']->renderError();
                    echo "<div class=\"contensorinput\">".$form['login']->render()."</div>";
                ?>
            </div>
            <div class="db">
                <?php
                    echo $form['cpf']->renderLabel();
                    echo $form['cpf']->renderError();
                    echo "<div class=\"contensorinput\">".$form['cpf']->render()."</div>";
                ?>
            </div>
            <div class="t">
                <?php
                    echo $form['nome']->renderLabel();
                    echo $form['nome']->renderError();
                    echo "<div class=\"contensorinput\">".$form['nome']->render()."</div>";
                ?>
            </div>
            <div class="db">
                <?php
                    echo $form['cargo']->renderLabel();
                    echo $form['cargo']->renderError();
                    echo "<div class=\"contensorinput\">".$form['cargo']->render()."</div>";
                ?>
            </div>
             <span class="clearfix"></span>
            <div class="tc">
                <?php
                    echo $form['email']->renderLabel();
                    echo $form['email']->renderError();
                    echo "<div class=\"contensorinput\">".$form['email']->render()."</div>";
                ?>
            </div>
            <div class="db">
                <?php
                    echo $form['senha']->renderLabel();
                    echo $form['senha']->renderError();
                    echo "<div class=\"contensorinput\">".$form['senha']->render()."</div>";
                ?>
            </div>
            <div class="db">
                <?php
                    //echo $form['idusuarios']->renderLabel();
                    //echo $form['idusuarios']->renderError();
                    echo "<div class=\"contensorinput\">".$form['idusuarios']->render()."</div>";
                ?>
            </div>
             <span class="clearfix"></span>
        </fieldset>
    </div>
    </br>    
    <div align="center">
<!--            <button value="Voltar" class="botaoVoltarCinza">Voltar</button>-->
        &nbsp;<a href="<?php echo url_for('login/index') ?>">Voltar</a>
        <?php if (!$form->getObject()->isNew()): ?> 
            &nbsp;<?php echo link_to('Apagar', 'login/delete?idusuarios='.$form->getObject()->getIdusuarios(), array('method' => 'delete', 'confirm' => 'Você confirma esta operação?')) ?>
        <?php endif; ?>
        <!--<input type="submit" value="Salvar" />-->
        <button type="submit" value="Salvar alterações" class="botaoSalvarCinza" >Salvar alterações</button>
    </div>
    </br>
    <?php //echo $form ?>
